package com.iursp;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

import com.iursp.conf.interceptor.CacheKeyGenerator;
import com.iursp.conf.interceptor.LockKeyGenerator;

import de.codecentric.boot.admin.config.EnableAdminServer;

@SpringBootApplication
@ComponentScan(basePackages={"com.iursp"})
@EnableScheduling
@EnableAdminServer
public class App {
	public static void main(String[] args) {
		SpringApplication.run(App.class, args);
	}
	
	//解决重复提交(本地锁方式)
	@Bean
	public CacheKeyGenerator cacheKeyGenerator() {
		return new LockKeyGenerator();
	}
}
